package com.lao.demo.strategymode.controller;

import cn.hutool.json.JSON;
import cn.hutool.json.JSONException;
import com.lao.demo.strategymode.service.JsapiFacadeImpl;
import com.lao.demo.strategymode.service.PayType;
import com.lao.demo.strategymode.service.WechatPay;
import com.lao.demo.strategymode.shulin.People;
import com.lao.demo.strategymode.shulin.PeopleFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.Writer;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author: xuchao
 * @Description: 策略模式
 * @Date: 2021/3/12 11:35
 */
@RestController
@RequestMapping("/strategy")
public class StrategyController {
    @Autowired
    private static PeopleFactory people;
    @Autowired
    private JsapiFacadeImpl jsapiFacade;
    @GetMapping("test")
    public void testStrategy(){
        jsapiFacade.createJsapiSignature("8888");
    }

    public static void main(String[] args) {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
        String format1 = format.format(new Date());
        System.out.println(format1);
    }



}
